Here is an example blog post.

import numpy as np

x = np.arange(44).reshape(11,4)
print(x)
#> [[ 0  1  2  3]
#>  [ 4  5  6  7]
#>  [ 8  9 10 11]
#>  [12 13 14 15]
#>  [16 17 18 19]
#>  [20 21 22 23]
#>  [24 25 26 27]
#>  [28 29 30 31]
#>  [32 33 34 35]
#>  [36 37 38 39]
#>  [40 41 42 43]]

We can also sneakily print python objects in R

xx = as.data.frame(py$x)
xx

And grab R objects in python

yy = 2 * xx
print(r.yy)
#>       V1    V2    V3    V4
#> 0    0.0   2.0   4.0   6.0
#> 1    8.0  10.0  12.0  14.0
#> 2   16.0  18.0  20.0  22.0
#> 3   24.0  26.0  28.0  30.0
#> 4   32.0  34.0  36.0  38.0
#> 5   40.0  42.0  44.0  46.0
#> 6   48.0  50.0  52.0  54.0
#> 7   56.0  58.0  60.0  62.0
#> 8   64.0  66.0  68.0  70.0
#> 9   72.0  74.0  76.0  78.0
#> 10  80.0  82.0  84.0  86.0

And we can also import between languages

sklearn = reticulate::import("sklearn")
rf = sklearn$ensemble$RandomForestRegressor(n_estimators = 100)
rf
#> RandomForestRegressor(bootstrap=True, criterion='mse', max_depth=None,
#>                       max_features='auto', max_leaf_nodes=None,
#>                       min_impurity_decrease=0.0, min_impurity_split=None,
#>                       min_samples_leaf=1, min_samples_split=2,
#>                       min_weight_fraction_leaf=0.0, n_estimators=100.0,
#>                       n_jobs=None, oob_score=False, random_state=None,
#>                       verbose=0, warm_start=False)